
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css" />
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="js/L_EditProf.js"></script>
 
 
 <style type="text/css">
 
 #font{font-size:13px;}
 #set{font-size:11px;}
 div #pageMiddle{padding-left:20px;}
div #profile_pic_box{float:left; padding-left:10px; padding-top:10px; border:#999 2px solid; width:140px; height:150px; margin:0px 0px 0px 0px; overflow-y:hidden;}
div #profile_pic_box > img{z-index:2000; width:200px;}
div #profile_pic_box > a {
	display: none;
	position:absolute; 
	margin:140px 0px 0px 120px;
	z-index:4000;
	background:#D8F08E;
	border:#81A332 1px solid;
	border-radius:3px;
	padding:5px;
	font-size:12px;
	text-decoration:none;
	color:#60750B;
}
div #profile_pic_box > form{
	display:none;
	position:absolute; 
	z-index:3000;
	padding:10px;
	opacity:.8;
	background:#F0FEC2;
	width:140px;
	height:140px;
}
div #profile_pic_box:hover a {
    display: block;
}
img.friendpics{border:#000 1px solid; width:40px; height:40px; margin:2px;}
 
 </style>
 
 
 
</head>



<?php
//include('php/check_login_status.php');
session_start();

// Initialize any variables that the page might echo
$u = "";
$sex = "Male";
$userlevel = "";
$country = "";
$joindate = "";
$lastsession = "";

	$u = $_SESSION['username'];
	

include('php/connection.php');
$sql = "SELECT * FROM `lawyer` WHERE `Email`='$u' AND `Activated`=1 LIMIT 0, 30 ";

   $user_query= mysqli_query($con, $sql);
	$numrows = mysqli_num_rows($user_query);
if($numrows < 1){
	echo "That user does not exist or is not yet activated, press back";
    exit();	
}


// Fetch the user row from the query above
while ($row = mysqli_fetch_array($user_query, MYSQLI_ASSOC)) {
	$nic = $row["idLawyer"];
	$fname = $row["Fname"];
	$lname = $row["Lname"];
	$init = $row["Initials"];
	$exper = $row["Expertise"];
	$ti = $row["Tittle"];
	$addr = $row["Address"];
	$tel = $row["Tele"];
	$mob = $row["Mobile"];
	$inter = $row["Interest"];
	$acheiv = $row["Acheivements"];
	$gender = $row["Gender"];
	$country = $row["Location"];
	$educ = $row["Education"];
	$signup = $row["Signup"];
	$lastlogin = $row["Lastlogin"];
	$joindate = strftime("%b %d, %Y", strtotime($signup));
	$lastsession = strftime("%b %d, %Y", strtotime($lastlogin));
	$image=$row["Image"];
	$profpic='<img src="php/user/'.$nic.'/'.$image.'" alt="'.$fname.'" width="130" height="200">';
	
	if($image == NULL){
	$profpic= '<img src="images/user.png" alt="'.$fname.'" width="120" height="180">';
}
}
?>

<?php  
 //$avatar_form  = '<form id="avatar_form" enctype="multipart/form-data" method="POST" action="php/imageupload.php">';
	//$avatar_form .=   '<div id="pform" style="display: none"><h4>Change your Profile picture</h4>';
	//$avatar_form .= '<span id="ph"></span>';
	//$avatar_form .=   '<input type="file" name="photo" required></br>';
	//$avatar_form .=   '<p><input name="mybtn" type="submit" value="Upload" /></p>';
	//$avatar_form .= '</div></form>';
    //$profile_pic_btn = '<a href="#" onclick="return false;" onmousedown="toggleElement(\'pform\')">Click here to change image...</a>';
	 //onclick="upload()" 
?>


<body>
<form id="avatar_form" class="well span10"  enctype="multipart/form-data" method="POST" action="php/imageupload.php">
<div id="pageMiddle">

 <div id="profile_pic_box" >
 
 
  <a href="#" id="toggle" onclick="return false;" onmousedown="toggleElement(this)">Click here to change image...</a>
 <div id="me"><?php echo $profpic; ?></div>
 
 </div>
</div>




 <div id="pform" style="display: none"><h4>Change your Profile picture</h4>
 
 <input type="file" name="photo">
<p><input name="mybtn" type="submit" value="Upload" /></p>
</div>

<p><br/>
 <label><strong id="font">&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $init.' '.$fname.' '.$lname  ?>&nbsp;&nbsp;</strong><a href="#Ename" data-toggle="modal"><span id="set">Edit</span></a>
 
 
 
<div id="editp">
<form class="well span3"> 
<div> <strong id="font">&nbsp;&nbsp;&nbsp;<?php echo $ti; ?>&nbsp;&nbsp;</strong><a href="#Etittle" data-toggle="modal"><span id="set">&nbsp;Edit</span></a></div>
</form>
 </div>
 
    <!--start-->
  <br/>
</form>




<div id="law">
<form action="" class="well span10">




 

 <hr class="black"></hr>


<p>
Expertised in : <?php echo $exper.'.'?><a href="#myModal" data-toggle="modal"><span id="set">Edit</span></a><br/>

Education : <?php echo $educ.'.' ?> <a href="#myModal" data-toggle="modal"><span id="set">Edit</span></a><br/><br/>

<p><strong>Contact </strong><br/>
 Email     : <?php echo '<a href="mailto:madushirathnayake89@gmail.com?sid=">' . $u . '</a>'; ?> <br/>
 Telephone : <?php echo $tel.'.'?><a href="#myModal" data-toggle="modal"><span id="set">Edit</span></a> <br/>
 Mobile    : <?php echo $mob.'.'?><a href="#myModal" data-toggle="modal"><span id="set">Edit</span></a><br/>
 Office Address:  <?php echo $addr.'.'?><a href="#myModal" data-toggle="modal"><span id="set">Edit</span></a><br/>
</p>

<p> Interests : <?php echo $inter.'.'?><a href="#myModal" data-toggle="modal"><span id="set">Edit</span></a><br/>
 Acheivements    : <?php echo $acheiv.'.'?><a href="#myModal" data-toggle="modal"><span id="set">Edit</span></a>
</p>

<p> Join date : <?php echo $joindate.'.'?><br/>
 Last login  : <?php echo $lastsession.'.'?>
</p>

</label>
 <p> <input name="" type="submit" class="btn" value="<<Back"/>
 &nbsp;&nbsp;&nbsp;&nbsp;
 
 <a href="#myModal" class="btn btn-primary" data-toggle="modal">click to send request</a> 
 </div>
 
 
 
 
 
 </p>
 
 
 
 
 <!--------------------------------------------------First name -------------------------------------------------------------->
 <!--------------------------------------------------First name -------------------------------------------------------------->
 <!--------------------------------------------------First name -------------------------------------------------------------->
 
 
 
  <div class="modal hide fade" id="Ename" aria-hidden="true">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Edit Your Name</h4>
            </div>


            <div class="modal-body">
                <form>
                  
                    <label> Initials:</label>
                    <input type="text" class="span4" placeholder="Edit your Initials.." id="inname"/> &nbsp;&nbsp;
					<button type="button" class="btn btn-success" id="Insave">Save</button>
					<button type="reset" class="btn">Clear</button>
					</br>
                    <label> First Name:</label>
                    <input type="text" class="span4" placeholder="Edit your First name.." id="fname"/>&nbsp;&nbsp;
					<button type="button" class="btn btn-success" id="Fsave">Save</button>
					<button type="reset" class="btn">Clear</button>
					</br>
                    <label> Last Name:</label>
                    <input type="text" class="span4" placeholder="Edit your Last name.." id="Lname"/>&nbsp;&nbsp;
					<button type="button" class="btn btn-success" id="lsave">Save</button>
					<button type="reset" class="btn">Clear</button>
                    <br/>
					<span id="Fstatus"></span>
					<br/>
                   <button type="button" class="btn btn-success" id="Allsave">Save all</button>
                    <!--<button type="reset" class="btn">Clear</button> -->
                </form>
</div>


            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>

            </div>
			
		
</div>
<!------------------ End of first name --------------------------------------------------------------------------- -->
 
 
 
 
 
 <!--------------------------------------------------Tittle -------------------------------------------------------------->
 <!--------------------------------------------------Tittle -------------------------------------------------------------->
 <!--------------------------------------------------Tittle -------------------------------------------------------------->
 
 
 
  <div class="modal hide fade" id="Etittle" aria-hidden="true">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Edit your Tittle</h4>
            </div>


            <div class="modal-body">
                <form>
                  
                    <label> Tittle:</label>
                    <input type="text" class="span4" id="titl"/></br>
                    
					
					<span id="Tstatus"></span>
					<br/>
                    <button type="button" class="btn btn-success" id="titt">Save</button>
                    <button type="reset" class="btn">Clear</button>
                </form>
</div>


            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>

            </div>
			
		
</div>
<!------------------ End tittle --------------------------------------------------------------------------- -->
 
 
 
 
 <!-----------------------------------------------Expert --------------------------------------------------------------- -->
 <!-----------------------------------------------Expert --------------------------------------------------------------- -->
 <!-----------------------------------------------Expert --------------------------------------------------------------- -->
 
 <div class="modal hide fade" id="Expert" aria-hidden="true">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Login as a client</h4>
            </div>


            <div class="modal-body">
                <form>
                  
                    <label> Telehpone:</label>
                    <input type="text" class="span4"/></br>
                    <label> Mobile:</label>
                    <input type="text" class="span4"/></br>
                    <label> Address:</label>
                    <input type="text" class="span4"/>
                    <br/>
					<span id="status"></span>
					<br/>
                    <button type="button" class="btn btn-success" id="saveLp">Save</button>
                    <button type="reset" class="btn">Clear</button>
                </form>
</div>


            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>

            </div>
			
		
</div>
 
 <!--------------------End of---------------------------Expert --------------------------------------------------------------- -->
 <!--------------------End of---------------------------Expert --------------------------------------------------------------- -->
 <!--------------------End of---------------------------Expert --------------------------------------------------------------- -->
 
 
 
 
 
 <!-----------------------------------------------Education --------------------------------------------------------------- -->
 <!-----------------------------------------------Education --------------------------------------------------------------- -->
 <!-----------------------------------------------Education --------------------------------------------------------------- -->
 
 <div class="modal hide fade" id="Educ" aria-hidden="true">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Login as a client</h4>
            </div>


            <div class="modal-body">
                <form>
                  
                    <label> Telehpone:</label>
                    <input type="text" class="span4"/></br>
                    <label> Mobile:</label>
                    <input type="text" class="span4"/></br>
                    <label> Address:</label>
                    <input type="text" class="span4"/>
                    <br/>
					<span id="status"></span>
					<br/>
                    <button type="button" class="btn btn-success" id="saveLp">Save</button>
                    <button type="reset" class="btn">Clear</button>
                </form>
</div>


            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>

            </div>
			
		
</div>
 
 <!--------------------End of---------------------------Education --------------------------------------------------------------- -->
 <!--------------------End of---------------------------Education --------------------------------------------------------------- -->
 <!--------------------End of---------------------------Education --------------------------------------------------------------- -->
 
 
 
 <!-----------------------------------------------Modal for leave a message--------------------------------------------------------------- -->
 <!-----------------------------------------------Modal for leave a message--------------------------------------------------------------- -->
 <!-----------------------------------------------Modal for leave a message--------------------------------------------------------------- -->
        <div class="modal hide fade" id="myModal" aria-hidden="true">

  <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Send request for service..</h4>
  </div>


            <div class="modal-body">
                <form>
                   <label>Type your legal issue:</label>
                      <textarea id="message" name="message" rows="8" cols="80" class="span5"></textarea>
                    <br/><br/>
                    <button type="submit" class="btn btn-success">Send request</button>
                    <button type="reset" class="btn">Clear</button>
                </form>
</div>


            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>

            </div>
            
  <!-- End modal------------------------------------------------->          
 
</form>
</div>
</body>
</html>
